#ifndef __COMMON_DEF__
#define __COMMON_DEF__

#include "board_config.h"

typedef struct{    
    TaskData          task;
}TaskData_t;


#define COM_TASK_DEF(name)		TaskData_t g_##name##_task

#define COM_TASK_EXTERN(name)	extern TaskData_t g_##name##_task

#define COM_TASK_INIT(name, func)							\
{															\
    TaskData_t *theuser = &g_##name##_task;				\
	memset(theuser, 0, sizeof(*theuser));					\
	theuser->task.handler = func;							\
}

#define COM_GET_TASK_DATA(name)	(&g_##name##_task)

#define COM_GET_TASK(name)	(&g_##name##_task.task)


#endif  /*__COMMON_DEF__*/
